<extend name="Layout:layout_content" />
<block name="body_main">
    <div class="grid-parent xsui-page-header">
        <a href="{:U('user_export','id=varkey')}" class="xsui-btn ui-state-default lnk-remove"><i class="fa fa-remove"></i>批量删除</a>
        <a href="#" class="xsui-btn ui-state-default lnk-refresh"><i class="fa fa-refresh"></i>刷新</a>
    </div>
    <div id="grid-container">
        {$content}
    </div>
</block>
<block name="body_after">    
    <script type="text/javascript">
        $(function () {
            // 动态显示隐藏菜单 2015-10-24 SoChishun Added.
            $('td.status a').click(function () {
                var $a = $(this);
                $.get($a.attr('href'), function (data) {
                    if (data.status) {
                        var href = $a.attr('href');
                        if (href.indexOf('status/0') > -1) {
                            $a.attr('href', href.replace('status/0', 'status/1')).find('i').removeClass('fa-check').addClass('fa-times');
                        } else {
                            $a.attr('href', href.replace('status/1', 'status/0')).find('i').removeClass('fa-times').addClass('fa-check');
                        }
                    } else {
                        $('<div>' + data.info + '</div>').dialog();
                    }
                });
                return false;
            })
        })
    </script>
</block>